home *** CD-ROM | disk | FTP | other *** search
/ 8bitfiles.net/archives / archives.tar / archives / geos-archive / GEOS-D64 / GEOS Mega ASM (19xx)(-).d64 / list5-3 < prev    next >
Text File  |  2019-04-13  |  5KB  |  232 lines

  1. if .p
  2.      t     "TopSym"
  3.      t     "TopMac"
  4. :grcntrl1     =     $d011
  5. :BildBit     =     %10000000
  6. :MausBit     =     %01000000
  7. :Proze~Bit     =     %00100000
  8. :BildAus     =     %01111111
  9. :MausAus     =     %10111111
  10. :Proze~Aus     =     %11011111
  11. endif
  12.  
  13. :Start
  14.      lda     #0
  15.      jsr     SetPattern
  16.      LoadB     dispBufferOn,ST_WR_FORE!ST_WR_BACK
  17.      ldy     #5
  18. ::10
  19.      lda     RecTabelle,y
  20.      sta     r2L,y
  21.      dey
  22.      bpl     :10
  23.      jsr     Rectangle
  24.      LoadW     r0,Men}Tabelle     ; Zeiger auf Men}Tabelle
  25.      lda     #0     ; Maus auf 1. Men}pkt
  26.      jsr     DoMenu     ; Men} darstellen
  27.  
  28.      LoadW     iconSelFlag,ST_INVERT
  29.      LoadW     r0,IconTable     ; Zeiger auf Icons
  30.      jsr     DoIcons     ; Icon darstellen
  31.  
  32.      jsr     InitProze~
  33.  
  34.      LoadB     FlagByte,BildBit ! MausBit ! Proze~Bit
  35.      jsr     SetzeZeit
  36.      ldx     #0
  37.      jsr     RestartProcess
  38.      rts          ; R}cksprung zur MainLoop
  39.  
  40. :RecTabelle
  41.      b     0
  42.      b     199
  43.      w     0
  44.      w     319
  45.  
  46. :Men}Tabelle
  47.      b     0     ; obere  y-Koord. (byte)
  48.      b     14     ; untere y-Koord. (byte)
  49.      w     0     ; linke  x-Koord. (word)
  50.      w     102     ; rechte x-Koord. (word)
  51.      b     3 ! HORIZONTAL     
  52.  
  53.      w     geosText     
  54.      b     SUB_MENU     
  55.      w     geosSubTabelle     
  56.  
  57.      w     ZeitText
  58.      b     MENU_ACTION
  59.      w     ZeitReaktion
  60.  
  61.      w     VerlassenText
  62.      b     MENU_ACTION
  63.      w     EnterDeskTop
  64.  
  65. :VerlassenText
  66.      b     "verlassen",NULL
  67.  
  68. ;------------Hauptmen}punkt geos----------------
  69. :geosText     
  70.      b     "geos",NULL
  71.  
  72. :geosSubTabelle
  73.      b     15     ; obere  y-Koord. (byte)
  74.      b     29     ; untere y-Koord. (byte)
  75.      w     0     ; linke  x-Koord. (word)
  76.      w     40     ; rechte x-Koord. (word)
  77.      b     1 ! VERTICAL     
  78.  
  79.      w     InfoText     
  80.      b     MENU_ACTION     
  81.      w     InfoReaktion     
  82.  
  83. :InfoText
  84.      b     "Info",NULL
  85.  
  86. :InfoReaktion
  87.      jsr     GotoFirstMenu
  88.      jsr     MonitorAn
  89.      LoadW     r0,InfoDiaTab
  90.      jsr     DoDlgBox
  91.      rts
  92. :InfoDiaTab
  93.      b     $81     ; Standard
  94.      b     DBTXTSTR
  95.      b     10
  96.      b     25
  97.      w     InfoText1
  98.  
  99.      b     DBTXTSTR
  100.      b     10
  101.      b     40
  102.      w     InfoText2
  103.  
  104.      b     DBTXTSTR
  105.      b     10
  106.      b     55
  107.      w     InfoText3
  108.  
  109.      b     OK
  110.      b     16
  111.      b     70
  112.      b     NULL
  113.  
  114. :InfoText1     b     BOLDON,OUTLINEON,"BlackScreen"
  115.      b     PLAINTEXT,BOLDON,NULL
  116. :InfoText2     b     "Ein Beipiel f}r eine",NULL
  117. :InfoText3     b     "Application",NULL
  118.  
  119. ;------------Hauptmen}punkt Zeit----------------
  120.      
  121. :ZeitText     b     "Zeit",NULL
  122. :ZeitReaktion
  123.      jsr     ReDoMenu
  124.      rts
  125.  
  126. ;------------Iconbehandlung---------------------
  127.  
  128.      :XIcon = 12
  129.      :YIcon = 154
  130.  
  131. :IconTable     b     1     ; 1 Icon     
  132.      w     0      ; keine neue Maus     postion !
  133.      b     0      ; (Y-Position Maus)
  134.  
  135.      w     IconGrafik     ; Zeiger auf kompr. Bitmap     
  136.      b     XIcon     ; X-Position Icon     
  137.      b     YIcon     ; Y-Position Icon     
  138.      b     IconBreite     ; Breite des Icon     s
  139.      b     IconH|he     ; H|he des Icons
  140.      w     IconRoutine     ; Iconroutine
  141.  
  142. :IconGrafik
  143. :IconBreite     = .x
  144. :IconH|he          = .y
  145.  
  146. :IconRoutine
  147.      lda     #Proze~Bit
  148.      bit     FlagByte
  149.      beq     :0     ; Verzweige wenn Proze~ aus
  150.      lda     FlagByte
  151.      and     #Proze~Aus
  152.      sta     FlagByte
  153.      jsr     MonitorAn
  154.      jsr     SetzeZeit
  155.      ldx     #0
  156.      jsr     BlockProcess
  157.      rts
  158. ::0
  159.      lda     FlagByte
  160.      ora     #Proze~Bit
  161.      sta     FlagByte
  162.      ldx     #0
  163.      jsr     UnblockProcess
  164.      rts
  165. ;------------Proze~behandlung-------------------     
  166. :InitProze~
  167.      LoadW     r0,Proze~Tabelle
  168.      lda     #1
  169.      jsr     InitProcesses
  170.      rts
  171. :Proze~Tabelle
  172.      w     Proze~Routine
  173.      w     2
  174. :Proze~Routine
  175.      CmpW     MausXAlt,mouseXPos     
  176.      bne     :0     ; Maus bewegt
  177.      CmpB     MausYAlt,mouseYPos
  178.      bne     :0     ; Maus bewegt
  179.      lda     FlagByte
  180.      and     #MausAus
  181.      sta     FlagByte 
  182.      jmp     :1
  183. ::0     lda     FlagByte
  184.      ora     #MausBit
  185.      sta     FlagByte     
  186. ::1     MoveW     mouseXPos,MausXAlt
  187.      MoveB     mouseYPos,MausYAlt
  188.      bit     FlagByte     ; Testen ob Monitor an
  189.      bmi     :3     ; Verzweige wenn Monitor an
  190.      bvs     :2     ; Verzweige wenn Maus bewegt
  191.      rts     
  192. ::2     jsr     MonitorAn
  193.      jmp     SetzeZeit
  194. ::3     bvc     :4     ; Verzweige wenn Maus ruhig
  195.      jmp     SetzeZeit     ; Z{hler zur}cksetzen, Ende
  196. ::4     ldx     #a1L
  197.      jsr     Ddec
  198.      bne     :5     ; Verzweige wenn Z{hler = 0
  199.      jsr     MonitorAus
  200. ::5     rts
  201.  
  202. :FlagByte     b     0
  203. :ZeitWert     w     200
  204.  
  205. :SetzeZeit
  206.      MoveW     ZeitWert,a1
  207.      rts
  208. :MonitorAn     
  209.      jsr     InitForIO
  210.      lda     grcntrl1
  211.      ora     #%00010000
  212.      sta     grcntrl1
  213.      jsr     DoneWithIO
  214.      lda     FlagByte
  215.      ora     #BildBit
  216.      sta     FlagByte
  217.      rts     
  218. :MonitorAus
  219.      jsr     InitForIO
  220.      lda     grcntrl1
  221.      and     #%11101111
  222.      sta     grcntrl1
  223.      jsr     DoneWithIO
  224.      lda     FlagByte
  225.      and     #BildAus
  226.      sta     FlagByte
  227.      rts
  228.  
  229. :MausXAlt     w     0
  230. :MausYAlt     b     0
  231.  
  232.